<template>
	<view style="background-color: #fff;">
		<view style="font-size: 38upx;font-weight: 600;text-align: center;">
			{{notice.title}}
		</view>
		<view style="font-size: 14upx;text-align: center;color: #555;margin-top: 20upx;">
			{{notice.createtime}}
		</view>
		<view style="padding: 30upx;">
			<rich-text :nodes="notice.detail"></rich-text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				openid:'',
				id:'',
				res:[],
				notice:[],
			};
		},
		onLoad:function(e){
			this.id = e.id
			uni.getStorage({
			    key: 'openid',
			    success: res => {
						this.openid = res.data
			    }
			});
			this.setAjax();
		},
		methods:{
			setAjax(){
				uni.request({
					url: 'https://app.t9y9y9.com/app/index.php?i=4&c=entry&m=ewei_shopv2&do=mobile&r=shop.notice.detail&app=1',
					method: 'POST',
					data: {
						'openid':this.openid,
						'id':this.id,
					},
					header:{'Content-Type':'application/x-www-form-urlencoded'},
					success: res => {
						// console.log(res)
						this.notice = res.data.notice
					},
					fail: () => {},
					complete: () => {}
				});
			},
			
		}
	}
</script>